using UnityEngine;
using UnityEngine.UI;

namespace Brick
{
	public class gdk_canvas : gdk_v_component
	{
		public override void OnStart()
		{
			float num = 720f;
			float num2 = 1280f;
			float num3 = 0f;
			float num4 = 0f;
			float num5 = 0f;
			num3 = Screen.width;
			num4 = Screen.height;
			float num6 = num / num2;
			float num7 = num3 / num4;
			if (num7 < num6)
			{
				num5 = num6 / num7;
			}
			CanvasScaler component = base.transform.GetComponent<CanvasScaler>();
			if (num5 == 0f)
			{
				component.matchWidthOrHeight = 1f;
			}
			else
			{
				component.matchWidthOrHeight = 0f;
			}
			Resolution[] resolutions = Screen.resolutions;
			if (resolutions.Length > 0)
			{
				Resolution resolution = resolutions[resolutions.Length - 1];
				int width = resolution.width;
				int height = resolution.height;
				Screen.SetResolution(width, height, fullscreen: true);
			}
			Screen.fullScreen = true;
		}
	}
}

